package com.ybkj.chat.module.mine.activity;

import android.content.Intent;
import android.os.Bundle;
import android.text.Html;
import android.view.View;
import android.widget.TextView;

import com.ybkj.chat.R;
import com.ybkj.chat.base.BaseMvpActivity;
import com.ybkj.chat.module.mine.presenter.CircleCoinPresenter;
import com.ybkj.chat.module.mine.view.CircleCoinView;
import com.ybkj.chat.ui.dialog.ChoosePayDialog;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * @author yyj
 * @create 2019-02-20 9:39
 * @Describe 圈币
 */
public class CircleCoinActivity extends BaseMvpActivity<CircleCoinPresenter> implements CircleCoinView {
    @BindView(R.id.tv_amount)
    TextView tvAmount;

    @Override
    protected void injectPresenter() {

    }

    @Override
    protected void initTitle() {
        setTitleText("圈币");
        setRightText("记录");
        setRightTextColor(R.color.color_dfd);
        setRightTextVisible(true);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_circle_coin;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {
        tvAmount.setText(Html.fromHtml("支付金额：<font color=\"#638DFD\">" + 9.2 + "元" + "</font>"));
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    @OnClick({R.id.tv_open,R.id.head_right_text})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.tv_open:
                ChoosePayDialog choosePayDialog = new ChoosePayDialog(this);
                choosePayDialog.setCanceledOnTouchOutside(false);
                choosePayDialog.show();
                break;
            case R.id.head_right_text:
                startActivity(new Intent(this, ChargeRecordActivity.class));
                break;
        }


    }
}
